package com.api.gateway.service;

import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;

/**
 * Created by hao.g on 18/4/2.
 */
public interface DecryptService {

    /**
     * 解签
     */
    String decryptSign(String param) throws InvalidKeyException, InvalidKeySpecException, NoSuchAlgorithmException;

    /**
     * 验签
     * @param src
     * @param desc
     * @return
     */
    boolean validateSign(String src, String desc);

    /**
     * 解密数据
     */
    String decryptData(String data, String signClear) throws InvalidKeySpecException, NoSuchAlgorithmException;

}
